<?php

return CMap::mergeArray(
    require('main.php'), array(
        'name'   => 'Administrator',
        'import' => array(),
        'components' => array(
            'request' => array(
                'enableCsrfValidation'   => false,
                'enableCookieValidation' => false,
            ),

            'user' => array(
               // 'class' => 'application.modules.auth.components.WebUser',
                'allowAutoLogin' => true,
                'stateKeyPrefix' => '_backend',
                'loginUrl'       => array('/login')
            ),
            'urlManager' => array(
                'rules' => array(
                    '<action:(login|logout|error|index)>' => 'auth/default/<action>',
                    '<controller:\w+>/<action:\w+>'       => '<controller>/<action>',
                    '<module:\w+>/<controller:\w+>/<action:\w+>'=>'<module>/<controller>/<action>'
                ),
            ),
            'errorHandler' => array(
                'errorAction' => 'auth/default/error',
            ),
            // 'authManager' => array(
            //     'class'        => 'CDbAuthManager',
            //     'connectionID' => 'db',
            // ),
            'log' => array(
                'class'  => 'CLogRouter',
                'routes' => array(
                    array(
                        'class'  => 'CFileLogRoute',
                        'levels' => 'error, warning',
                    ),
                    array(
                        'class'   => 'CFileLogRoute',
                        'enabled' => true,
                        'levels'  => 'info',
                        'categories' => 'test-var-1',
                        'logFile' => 'test_var.html',
                    ),
                    array(
                        'class'   => 'CWebLogRoute',
                        'enabled' => true,
                        'levels'  => 'info',
                        'showInFireBug' => false,
                        'categories' => 'test-var-2',
                    ),
                ),
            ),
            'session'     => array(
                'sessionName' => 'ledatcms',
                'timeout'     => 3600, // 1 hour,
                'autoStart' => true,
            ),
            'format' => array(
                'class' => 'application.components.Formatter',
            ),
        ),
        'modules' => array(
            'auth',
            'dadmin',
            'gii' => array(
                'class'     => 'system.gii.GiiModule',
                'password'  => 'ledat',
                'ipFilters' => array('192.168.100.5'),
            ),
        ),
        'defaultController' => 'dadmin/default/index',
//        'sourceLanguage'    => 'en_us', 'language' => 'en',
        'sourceLanguage'    => 'vi_vn',
        'language'          => 'vi',
    )
);
?>